#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import file_blueprint
from api_1_0.fileResource.fileResource import FileResource
from api_1_0.fileResource.fileOtherResource import FileOtherResource, FileAddResource

api = Api(file_blueprint)

api.add_resource(FileResource, '/file/<file_id>', '/file', endpoint='File')


# 上传实验报告
@file_blueprint.route('/file/update/<file_id>', methods=['PUT'], endpoint='FileUpdate')
def update(file_id):
    return FileOtherResource.sensitive_update(file_id)


# 新增实验信息
api.add_resource(FileAddResource, '/file/add', endpoint='add_file')

